package yazan.com.pdacollector_android.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import org.greenrobot.greendao.database.Database;

import yazan.com.pdacollector_android.model.DaoMaster;
import yazan.com.pdacollector_android.model.GoodsDao;
import yazan.com.pdacollector_android.utils.MigrationHelper;

public class MyDevOpenHelper extends DaoMaster.DevOpenHelper {
    public MyDevOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory) {
        super(context, name, factory);
    }

    @Override
    public void onUpgrade(Database db, int oldVersion, int newVersion) {
        MigrationHelper.migrate(db, GoodsDao.class);
    }
}
